StdPix
The Image Compression Manager lets you invoke QuickDraw'sStdPix
function as follows:
pascal void StdPix (PixMapPtr src, const Rect *srcRect, MatrixRecordPtr matrix, short mode, RgnHandle mask, PixMapPtr matte, Rect *matteRect, short flags);
src
- Contains a pointer to a pixel map containing the image to draw. Use the
GetCompressedPixMapInfo
function (described on page 3-135) to retrieve information about this pixel map.srcRect
- Points to a rectangle defining the portion of the image to display. This rectangle must lie within the boundary rectangle of the compressed image or within the source image. If this parameter is set to
nil
, the entire image is displayed.matrix
- Contains a pointer to a matrix structure that specifies the mapping of the source rectangle to the destination. It is a fixed-point, 3-by-3 matrix. This roughly corresponds to the
dstRect
parameter to QuickDraw'sStdBits
routine. See the chapter "Movie Toolbox" in this book for more information about matrix operations.mode
- Specifies the transfer mode for the operation. The Image Compression Manager supports the same transfer modes supported by QuickDraw's
CopyBits
routine.- Note that this parameter also controls the accuracy of any decompression operation that may be required to display the image. If bit 7 (0x80) of the
mode
parameter is set to 1, theStdPix
function sets the decompression accuracy tocodecNormalQuality
. If this bit is set to 0, the function sets the accuracy tocodecHighQuality
.mask
- Contains a handle to a clipping region in the destination coordinate system. If specified, the compressor applies this mask to the destination image. If there is no mask, this parameter is set to
nil
.matte
- Points to a pixel map that contains a blend matte. The blend matte
causes the decompressed image to be blended into the destination pixel map. The matte can be defined at any supported pixel depth--the matte depth need not correspond to the source or destination depths. However, the matte must be in the coordinate system of the source image. If there is no matte, this parameter is set tonil
.- The matte may be compressed. Use the
GetCompressedPixMapInfo
function (described on page 3-135) to determine if the matte pixel map contains compressed data.matteRect
- Contains a pointer to a rectangle defining a portion of the blend matte to apply. This parameter is set to
nil
if there is no matte or if the entire matte is to be used.flags
- Contains control flags. The following flags are available:
callOldBits
- If this flag is set, then the
StdPix
function calls QuickDraw'sbitsProc
routine with the decompressed image data. A pointer to this routine is located in thebitsProc
field of theCQDProcs
record. If thebitsProc
routine is not customized, then it is not called unless thecallStdBits
flag is also set. See the description of theCQDProcs
record in Inside Macintosh: Imaging for more on thebitsProc
routine.callStdBits
If this flag is set, thecallOldBits
flag is set, and theCQDProcs
record'sbitsProc
field is set to theStdBits
routine, then theStdBits
routine is called with the decompressed image data.noDefaultOpcodes
- If this flag is set and a picture is open for writing, the default picture opcodes (for displaying a warning when QuickTime is not installed) are not added to the output picture. This can be useful when storing multiple
StdPix
opcodes in a single picture.